<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0" />
    <title>dc-example</title>
    <script src="/libs/dc-sdk/dc.min.js"></script>
    <link href="/libs/dc-sdk/dc.min.css" type="text/css" rel="stylesheet" />
    <link href="../index.css" type="text/css" rel="stylesheet" />
  </head>

  <body>
    <div id="viewer-container" class="viewer-container"></div>
    <script>
      DC.config.baseUrl = '../libs/dc-sdk/resources/'
      let viewer = new DC.Viewer('viewer-container')
      let baseLayer = DC.ImageryLayerFactory.createImageryLayer(
        DC.ImageryType.AMAP,
        {
          style: 'img',
          crs: 'WGS84',
        }
      )
      viewer.addBaseLayer(baseLayer)
      let layer = new DC.I3SLayer('layer')
      viewer.addLayer(layer)

      let i3s = new DC.I3S(
        'https://tiles.arcgis.com/tiles/z2tnIkrLQ2BRzr6P/arcgis/rest/services/Frankfurt2017_vi3s_18/SceneServer/layers/0',
        {
          cesium3dTilesetOptions: {
            skipLevelOfDetail: true,
            maximumScreenSpaceError: 128,
          },
        }
      )
      layer.addOverlay(i3s)
      viewer.flyToPosition(
        '8.667785654590075,50.10358812638023,806.0017044941886,17.973378573231702,-37.940813171994996'
      )
    </script>
  </body>
</html>
